# -*- coding: utf-8 -*-
"""
@Time ： 2024/7/5 17:06
@Auth ： 九问
@File ：urls.py
@IDE ：PyCharm
@Email : 2750826557@qq.com
"""
from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import *

urlpatterns = [
    path("register/", RegisterGenericViewSet.as_view({"post": "create"})),  # 用户注册
    path("code/", GetRegisterCodeGenericViewSet.as_view({"post": "create"})),  # 注册验证码
    path('login/', LoginGenericViewSet.as_view()),  # 用户登录
    path("logcode/<uuid:uuid>/", GetLoginCodeGenericViewSet.as_view({"get": "retrieve"})),  # 登录验证码
    path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),  # JWT Token获取
]

router = DefaultRouter()
router.register('users', UserViewSet, basename='users')  # 用户管理相关接口
urlpatterns += router.urls
